package com.feihao.zhou.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component("testProperties")
@PropertySource("classpath:jdbc.properties")
public class TestProperties {
    @Value("${jdbc.driver}")
    private String driverName;
    @Value("${jdbc.url}")
    private String url;
    @Value("${jdbc.username}")
    private String username;
    @Value("${jdbc.password}")
    private String password;

    public void test(){
        System.out.println(this.driverName);
        System.out.println(this.url);
        System.out.println(this.username);
        System.out.println(this.password);
    }
}
